package org.qs.webservice.dao.user;


import java.util.List;

import org.apache.ibatis.annotations.Param;
import org.qs.webservice.domain.UsConsume;
import org.springframework.stereotype.Component;

@Component
public interface UsConsumeMapper {
	/**
	 * 获取消费信息表
	 * @param user_id
	 * @param content_id
	 * @param consume_type
	 * @param begin_time
	 * @param end_time
	 * @return
	 */
	public List<UsConsume> getUsConsumeListByParam(@Param("user_id")Long user_id,@Param("content_id")int content_id,
			@Param("consume_type")int consume_type,@Param("begin_time")String begin_time,@Param("end_time")String end_time,
			@Param("pages")int pages,@Param("contents")int contents);
	public int getUsConsumeListCountByParam(@Param("user_id")Long user_id,@Param("content_id")int content_id,
			@Param("consume_type")int consume_type,@Param("begin_time")String begin_time,@Param("end_time")String end_time);
	public int getUsConsumeSumByParam(@Param("user_id")Long user_id,@Param("content_id")int content_id,
			@Param("consume_type")int consume_type,@Param("begin_time")String begin_time,@Param("end_time")String end_time);
	public int getUsSumFeeCountByBookId(@Param("book_id")int book_id,@Param("consume_type")int consume_type);
	public int addUsConsume(@Param("user_id")Long user_id,@Param("content_id")int content_id,@Param("sub_conent_id")int sub_conent_id,
			@Param("content_name")String content_name,@Param("consume_fee")int consume_fee,@Param("consume_type")int consume_type);
}